HAL1 CRYP –> HAL2 AES

This section provides information about the HAL CRYP io operation functions migration.

Encryption and decryption functions

HAL1

HAL2

HAL_CRYP_Encrypt();
/* or  */
HAL_CRYP_AESECB_Encrypt();
/* or  */
HAL_CRYP_AESCBC_Encrypt();
/* or  */
HAL_CRYP_AESCTR_Encrypt();
HAL_AES_Encrypt();
HAL_CRYP_Decrypt();
/* or  */
HAL_CRYP_AESECB_Decrypt();
/* or  */
HAL_CRYP_AESCBC_Decrypt();
/* or  */
HAL_CRYP_AESCTR_Decrypt();
HAL_AES_Decrypt();
HAL_CRYPEx_AES();
HAL_CRYP_Encrypt();
/* or  */
HAL_AES_Decrypt();

Encryption and decryption in interrupt mode functions

HAL1

HAL2

HAL_CRYP_Encrypt_IT();
/* or  */
HAL_CRYP_AESECB_Encrypt_IT();
/* or  */
HAL_CRYP_AESCBC_Encrypt_IT();
/* or  */
HAL_CRYP_AESCTR_Encrypt_IT();
HAL_AES_Encrypt_IT();
HAL_CRYP_Decrypt_IT();
/* or  */
HAL_CRYP_AESECB_Decrypt_IT();
/* or  */
HAL_CRYP_AESCTR_Decrypt_IT();
/* or  */
HAL_CRYP_AESCBC_Decrypt_IT();
HAL_AES_Decrypt_IT();
HAL_CRYPEx_AES_IT();
HAL_AES_Encrypt_IT();
/* or  */
HAL_CRYP_Decrypt_IT();

Encryption and decryption in DMA mode functions

HAL1

HAL2

HAL_CRYP_Encrypt_DMA();
/* or  */
HAL_CRYP_AESECB_Encrypt_DMA();
/* or  */
HAL_CRYP_AESCBC_Encrypt_DMA();
/* or  */
HAL_CRYP_AESCTR_Encrypt_DMA();
HAL_AES_Encrypt_DMA();
HAL_CRYP_Decrypt_DMA();
/* or  */
HAL_CRYP_AESECB_Decrypt_DMA();
/* or  */
HAL_CRYP_AESCBC_Decrypt_DMA();
/* or  */
HAL_CRYP_AESCTR_Decrypt_DMA();
HAL_AES_Decrypt_DMA();
HAL_CRYPEx_AES_DMA();
HAL_CRYP_Encrypt_DMA();
/* or  */
HAL_CRYP_Decrypt_DMA();

Related concept: Merge HAL extension files with common ones and remove the EX prefix from APIs.


Authentication functions

HAL1

HAL2

HAL_CRYPEx_AESGCM_GenerateAuthTAG();
HAL_AES_GCM_GenerateAuthTAG();
HAL_CRYPEx_AESCCM_GenerateAuthTAG();
HAL_AES_CCM_GenerateAuthTAG();

Suspension/resumption functions

HAL1

HAL2

HAL_CRYP_ProcessSuspend();
HAL_AES_RequestSuspend(); (*)
HAL_CRYP_Suspend();
HAL_AES_RequestSuspend(); (*)
HAL_AES_SaveContext();
HAL_CRYP_Resume();
HAL_AES_Resume();
HAL_CRYP_SaveContext();
HAL_AES_SaveContext();
HAL_CRYP_RestoreContext();
HAL_AES_RestoreContext();
HAL_CRYPEx_ProcessSuspend();
HAL_AES_RequestSuspend();

(*) : The suspension is non-blocking, and the suspension is done when the HAL_AES_SuspendCallback() callback is invoked.

Related concept: Merge HAL extension files with common ones and remove the EX prefix from APIs.


Wrap and unwrap key functions

HAL1

HAL2

HAL_CRYPEx_UnwrapKey();
HAL_AES_UnwrapKey();
HAL_CRYPEx_WrapKey();
HAL_AES_WrapKey();

Encrypt and decrypt shared key functions

HAL1

HAL2

HAL_CRYPEx_EncryptSharedKey();
HAL_AES_EncryptSharedKey();
HAL_CRYPEx_DecryptSharedKey();
HAL_AES_DecryptSharedKey();